{% if user.is_authenticated %}
  <div class="panel panel-default">
  <div class="panel-heading">
    <h3 class="panel-title">Download Cart</h3>
  </div>
  <div class="panel-body">
    <div class="no-gutter">
    <small>
    {%for item in cart_list%}
    <div class="col-md-5 col-sm-5" style="padding-left:0px;padding-right:0px"><a data-toggle="collapse" href="#{{item.code}}" aria-expanded="false" aria-controls="{{item.code}}">{{item.numfiles}} files</a></div>
    <div class="col-md-4 col-sm-4 text-right" style="padding-left:0px;padding-right:10px">{{item.size}}</div>
    <button class="btn btn-default btn-xs" value="{{item.code}}" name="bt_remove"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button>
    <button class="btn btn-default btn-xs" value="{{item.code}}" name="bt_download_one"><span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span></button>
    <div class="collapse" id="{{item.code}}">
      <br>
      <div class="well">
      <strong>Data Type:</strong><br> {{item.datatype}}<br>
      <strong>Period:</strong><br> {{item.info.dt1}} to {{item.info.dt2}}<br>
      <strong># Stations:</strong>
        <br>
        {% if item.info.instrument == "products" %}
          Multiple
        {% else %} 
          {{item.info.stations|length}}
        {% endif %}
        <br>
      <strong>Status:</strong><br> {{item.status}}
      </div>
    </div>
    <br>
    {%endfor%}    
    <hr>
    <div class="col-md-6">Totals:</div> <div class="col-md-6 text-right">{{total_files}} files</div><br>
    <div class="col-md-6"></div><div class="col-md-6 text-right">{{total_size}}</div>
    </small>
    </div>
    <br>
    <hr>
    <div class="col-md-3"></div>  
    <div class="btn-group col-md-6">
	    <button type="button" class="btn btn-sm btn-primary btn-block" id="bt_download_all" title="Download All Data">Download</button>
	</div>
  </div>
</div>
{% endif %}